<?php if(isset($gaga)): print_r($gaga); endif;?>
<div id="scnd-cont">
    <?php if(isset($message)){ ?>
        <?php  if($message != "0"): ?>
            <div class="alert alert-success"><i class="fa fa-check-circle"></i> Your Profile Has Been Updated</div>
        <?php else: ?>
            <div class="alert alert-danger"><i class="fa fa-frown-o fa-3x"></i><br/><?php echo $error ?></div>
        <?php endif; ?>
    <?php }else{ ?>
            <div class="alert alert-warning"><i class="fa fa-exclamation-triangle"></i> Don't ever edit your username. That can make your account disabled</div>
    <?php } ?>
    <form action="<?php echo site_url('User/edit_profile') ?>" enctype="multipart/form-data" method="post">
        <table class="table table-bordered">
            <tr>
                <td width="25%">Username </th>
                <td width="55%">
                    <input type="text" name="edit_username" class="form-control input-sm" disabled="disabled" value="<?php echo $user['username_user'] ?>"/>
                </td>
                <td rowspan="8" style="vertical-align: top; text-align: center;">
                    <?php if($user['user_ava'] != ""): ?>
                        <img src="<?php echo base_url()?>/Images/User_Avatar/<?php echo $user['user_ava'] ?>" width="100%"/>
                    <?php else: ?>
                        <img src="<?php echo base_url()?>/Images/User_Avatar/default-ava.png" width="100%"/>
                    <?php  endif; ?><br/><br/>
                    <input type="file" name="new_ava" style="float: none;margin: auto; width: 120px"/>
                </td>
            </tr>
            <tr>
                <td width="15%">Full Name </th>
                <td width="25%">
                    <input type="text" name="edit_fullname" class="form-control input-sm" value="<?php echo $user['fullname_user'] ?>"/>
                </td>
            </tr>
            <tr>
                <td>New Password </th>
                <td>
                    <input type="password" name="edit_password" class="form-control input-sm"/>
                </td>
            </tr>
            <tr>
                <td>Re-type New Password </th>
                <td>
                    <input type="password" name="edit_2ndpassword" class="form-control input-sm"/>
                </td>
            </tr>
            <tr>
                <td>Facebook Profile URL</th>
                <td>
                    <input type="text" name="edit_fb" class="form-control input-sm" value="<?php echo $user['fb_acc'] ?>"/>
                </td>
            </tr>
            <tr>
                <td>Twitter Profile URL</th>
                <td>
                    <input type="text" name="edit_twitter" class="form-control input-sm" value="<?php echo $user['twitter_acc'] ?>"/>
                </td>
            </tr>
            <tr>
                <td>Google+ Profile URL</th>
                <td>
                    <input type="text" name="edit_gplus" class="form-control input-sm"  value="<?php echo $user['gplus_acc'] ?>"/>
                </td>
            </tr>
            <tr>
                <td style="vertical-align:top">Bio</th>
                <td>
                    <textarea name="edit_bio" cols="10" class="form-control"><?php echo $user['bio'] ?></textarea>
                    <small>Max. 110 Characters</small>
                </td>
            </tr>
            <tr>
                <td colspan="4" align="center">
                    <button class="btn btn-lg btn-primary" type="submit" name="btn_update_user" value="update">
                        Update Profile
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>